package top.canyue.word_range_service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import top.canyue.word_range.pojo.po.WordMapping;

@Mapper
public interface WordMappingMapper extends BaseMapper<WordMapping> {

    @Select("SELECT * FROM word_mapping " +
            "ORDER BY RAND(#{seed}) " +
            "LIMIT 1 ")
    WordMapping getRandomWordByDay(Long seed);   // MySQL支持RAND函数传入种子

}
